﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// wx_userForm数据模型对象
    /// </summary>
    [Serializable]
    public partial class wx_userFormMod
    {
        /// <summary>
        /// 初始化wx_userForm数据模型对象
        /// </summary>
        public wx_userFormMod()
        {
            
        }
        /// <summary>
        /// 初始化wx_userForm数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="openID">OpenID</param>
        /// <param name="formID">FormID</param>
        /// <param name="cTime">CTime</param>
        /// <param name="useCount">useCount</param>
        public wx_userFormMod(long iD,string openID,string formID,DateTime cTime,int useCount)
        {
            //给ID字段赋值
            this.ID = iD;
            //给OpenID字段赋值
            this.OpenID = openID;
            //给FormID字段赋值
            this.FormID = formID;
            //给CTime字段赋值
            this.CTime = cTime;
            //给useCount字段赋值
            this.UseCount = useCount;
        }
        
		//属性存储数据的变量
        private long _iD;
        private string _openID;
        private string _formID;
        private DateTime _cTime;
        private int _useCount;
        
        /// <summary>
        /// ID
        /// </summary>
        public long ID
        {
            get { return this._iD; }
            set { this._iD = value; }
        }
        /// <summary>
        /// OpenID
        /// </summary>
        public string OpenID
        {
            get { return this._openID; }
            set { this._openID = value; }
        }
        /// <summary>
        /// FormID
        /// </summary>
        public string FormID
        {
            get { return this._formID; }
            set { this._formID = value; }
        }
        /// <summary>
        /// CTime
        /// </summary>
        public DateTime CTime
        {
            get { return this._cTime; }
            set { this._cTime = value; }
        }
        /// <summary>
        /// useCount
        /// </summary>
        public int UseCount
        {
            get { return this._useCount; }
            set { this._useCount = value; }
        }
        
        /// <summary>
        /// 对比两个wx_userForm数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的wx_userForm数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成wx_userForm数据模型对象
            wx_userFormMod wx_userFormMod = obj as wx_userFormMod;
            //判断是否转换成功
            if (wx_userFormMod == null) return false;
            //进行匹配属性的值
            return
                //判断ID是否一致
                this.ID == wx_userFormMod.ID &&
                //判断OpenID是否一致
                this.OpenID == wx_userFormMod.OpenID &&
                //判断FormID是否一致
                this.FormID == wx_userFormMod.FormID &&
                //判断CTime是否一致
                this.CTime == wx_userFormMod.CTime &&
                //判断useCount是否一致
                this.UseCount == wx_userFormMod.UseCount;
        }
        /// <summary>
        /// 将当前wx_userForm数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将wx_userForm数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将ID进行按位异或运算处理
                this.ID.GetHashCode() ^
                //将OpenID进行按位异或运算处理
                (this.OpenID == null ? 2147483647 : this.OpenID.GetHashCode()) ^
                //将FormID进行按位异或运算处理
                (this.FormID == null ? 2147483647 : this.FormID.GetHashCode()) ^
                //将CTime进行按位异或运算处理
                this.CTime.GetHashCode() ^
                //将useCount进行按位异或运算处理
                this.UseCount.GetHashCode();
        }
        /// <summary>
        /// 将当前wx_userForm数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前wx_userForm数据模型对象转换成字符串副本
            return
                "[" +
                //将ID转换成字符串
                this.ID + "," +
                //将OpenID转换成字符串
                this.OpenID + "," +
                //将FormID转换成字符串
                this.FormID + "," +
                //将CTime转换成字符串
                this.CTime + "," +
                //将useCount转换成字符串
                this.UseCount +
                "]";
        }
    }
}
